package com.lagou.edu.server;

/**
 * @author 胡益文
 * @since 2021/10/13 15:24
 */
public class Context extends LifecycleBase{
    private String contextName;
    private String contextPath;

    public Context(String contextName, String contextPath) {
        this.contextName = contextName;
        this.contextPath = contextPath;
    }

    public String getContextName() {
        return contextName;
    }

    public void setContextName(String contextName) {
        this.contextName = contextName;
    }

    public String getContextPath() {
        return contextPath;
    }

    public void setContextPath(String contextPath) {
        this.contextPath = contextPath;
    }


    @Override
    protected void initInternal() throws Exception {
        //每个项目（每个上下文）定义个classloader，实现加载隔离
        classLoader = new WebappClassloader(this.getClass().getClassLoader(),this);
    }

    @Override
    protected void startInternal() throws Exception {

    }
}
